<template>
  <div class="vmui-dialog-white-mask">
    <div class="vmui-dialog-action-sheet-white-mask" @click.self.stop="closeActionSheet()"></div>
    <div class="vmui-action-sheet">
      <div v-for="item in items" v-show="!(item && item.hidden)" class="vmui-action-sheet-item" :class="{'vmui-color-primary': item.color === true, 'vmui-color-disabled': item.disabled}" :style="{color: item.color}" @click.stop="!item.disabled && closeActionSheet(item)" v-html="item.text"></div>
      <div v-if="!(cancel && cancel.hidden)" class="vmui-action-sheet-item cancel" @click.stop="closeActionSheet(cancel)" v-html="cancel && cancel.text || '取消'"></div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      items: Array,
      cancel: Object,
      callback: Function
    }
  }
</script>

<style lang="scss" scoped>
  @import "../style";

  @import "styleMix";
  @include vmui-action-sheet;
</style>
